package com.xingu.xg.mapper.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Function;

@Data
@TableName("t_xg_tree_menu")
public class TreeMenuDo {

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long parentId;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long nextId;

    private String description;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;

    private String headFlag;

    private String sameLevelFlag;

    @TableField(exist = false)
    private final List<TreeMenuDo> treeMenuDos = new ArrayList<>();
}
